home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 1.2 KB | 66 lines | [TEXT/ToyS] |
- on run
- tell application "Note Pad" to activate
-
- FileNew()
-
- input state {keys down:"Hello World!"}
- pause for 5 with seconds timing
-
- SelectAll()
- pause for 30 -- Just for the user to see what's happening
- EditCut()
- FileRmv()
- FileQuit()
-
- -- Save as a clipping and tell Finder to open it
- set v1 to vol name of (the volume info of volume index 1)
- set myFile to v1 & ":Desktop Folder:Hello World!"
- save clipping GetClip() in myFile
- tell application "Finder"
- activate
- open (myFile as alias)
- pause for 60
- end tell
- activate
- collate myFile with the trasher
- end run
-
-
- on GetClip()
- set cp to {}
- set flavs to clip with content flavors
- repeat with flav in flavs
- set cp to cp & {clip flavor flav}
- end repeat
- return cp
- end GetClip
-
-
- on SelectAll()
- -- Select all
- input state {keys down:"A", command key down:true}
- end SelectAll
-
-
- on EditCut()
- -- Select all
- input state {keys down:"X", command key down:true}
- end EditCut
-
-
- on FileNew()
- input state {keys down:"n", command key down:true}
- end FileNew
-
-
- on FileRmv()
- input state {keys down:"d", command key down:true}
- pause for 30
- input state {keys down:ASCII character 3} -- Enter
- end FileRmv
-
-
- on FileQuit()
- input state {keys down:"Q", command key down:true}
- end FileQuit
-